package com.lhy.consumeropenfeign.controller;

import com.lhy.consumeropenfeign.feign.LoginFeignService;
import com.lhy.consumeropenfeign.feign.UserFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Liu Hangyu
 * @date 2022/1/7 22:32
 */
@CrossOrigin
@RestController
@RequestMapping("feign")
public class FigenController {

    @Autowired
    private UserFeignService userFeignService;

    @Autowired
    private LoginFeignService loginFeignService;


    @GetMapping("testFiegn")
    public String testFiegn() {
        return loginFeignService.login("aaaa") + userFeignService.selectAll("aa") + "";

    }

}
